﻿class Program

{

    static void Main()

    {

        int n = int.Parse(Console.ReadLine());

        long a = 1, b = 1;

        if (n <= 2)

        {

            Console.WriteLine(1);

            return;

        }

        for (int i = 3; i <= n; i++)

        {

            long temp = a + b;

            a = b;

            b = temp;

        }

        Console.WriteLine(b);

    }

}